/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package queenb.web.store;

import java.sql.SQLException;
import java.util.Date;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import oracle.jdbc.OracleTypes;
import queenb.net.datacontrol.DataStatement;
import queenb.net.datacontrol.Param;
import queenb.net.entitybean.N100;
import queenb.web.inteface.EmployeeInf;
import queenb.web.util.PackageContants;

/**
 *
 * @author Nguyen Hung
 */
public class EmployeeStore extends N100 implements EmployeeInf {

    @Override
    public int deleteEmployee(int pn100, String pnLogin) {
        DataStatement dataStatement = new DataStatement(PackageContants.DELETE_N100, OracleTypes.INTEGER, new Param[]{
                    new Param(OracleTypes.INTEGER, pn100),
                    new Param(OracleTypes.CHAR, pnLogin)
                });
        try {
            return super.update(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return 0;
        }
    }

    @Override
    public int updateN100By(int pn100, int fn600, int fk100, int fh200, String nv102, String nv103, int ni104, int ni105, String nv106, String nv107, String nv108, String nv109, String nv110, String nv111, String nv112, String nv113, int nv114, String nv115, String nv116, int nv117, Date pdND118, String nv119, String nv122, String nv123, Date nd124, Date nd125, String nv126,String nv127,String nv129,String nv130,Date pdND131, int fh000, int fn550,int fk300,int fk350, String pnLogin) {
        try {
            DataStatement dateStatement = new DataStatement(PackageContants.UPDATE_N100, OracleTypes.INTEGER, new Param[]{
                        new Param(OracleTypes.INTEGER, pn100),
                        new Param(OracleTypes.INTEGER, fn600),
                        new Param(OracleTypes.INTEGER, fk100),
                        new Param(OracleTypes.INTEGER, fh200),
                        new Param(OracleTypes.CHAR, nv102),
                        new Param(OracleTypes.CHAR, nv103),
                        new Param(OracleTypes.INTEGER, ni104),
                        new Param(OracleTypes.INTEGER, ni105),
                        new Param(OracleTypes.CHAR, nv106),
                        new Param(OracleTypes.CHAR, nv107),
                        new Param(OracleTypes.CHAR, nv108),
                        new Param(OracleTypes.CHAR, nv109),
                        new Param(OracleTypes.CHAR, nv110),
                        new Param(OracleTypes.CHAR, nv111),
                        new Param(OracleTypes.CHAR, nv112),
                        new Param(OracleTypes.CHAR, nv113),
                        new Param(OracleTypes.INTEGER, nv114),
                        new Param(OracleTypes.CHAR, nv115),
                        new Param(OracleTypes.CHAR, nv116),
                        new Param(OracleTypes.INTEGER, nv117),
                        new Param(OracleTypes.DATE, pdND118),
                        new Param(OracleTypes.CHAR, nv119),
                        new Param(OracleTypes.CHAR, nv122),
                        new Param(OracleTypes.CHAR, nv123),
                        new Param(OracleTypes.DATE, nd124),
                        new Param(OracleTypes.DATE, nd125),
                        new Param(OracleTypes.CHAR, nv126),
                        new Param(OracleTypes.CHAR, nv127),
                        new Param(OracleTypes.CHAR, nv129),
                        new Param(OracleTypes.CHAR, nv130),
                        new Param(OracleTypes.DATE, pdND131),
                        new Param(OracleTypes.INTEGER, fh000),
                        new Param(OracleTypes.INTEGER, fn550),
                        new Param(OracleTypes.INTEGER, fk300),
                        new Param(OracleTypes.INTEGER, fk350),
                        new Param(OracleTypes.CHAR, pnLogin),});

            System.out.println("--------------------------" + pn100);
            return super.update(dateStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return 0;
        }

    }

    @Override
    public List<N100> getAllListTabN100(int fh00, int fh200, int pnPN100, int pnFN450, int pnFN850, String nv103, String pvLogin) {
        DataStatement dataStatement = new DataStatement(PackageContants.LIST_TABN100N, OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.INTEGER, fh00),
                    new Param(OracleTypes.INTEGER, fh200),
                    new Param(OracleTypes.INTEGER, pnPN100),
                    new Param(OracleTypes.INTEGER, pnFN450),
                    new Param(OracleTypes.INTEGER, pnFN850),
                    new Param(OracleTypes.CHAR, nv103),
                    new Param(OracleTypes.CHAR, pvLogin)
                });
        try {
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }




    }

    @Override
    public List<N100> getListN100ById(int pn100, String pvLogin) {
        try {
            DataStatement dataStatement = new DataStatement(PackageContants.LiST_TABN100DE, OracleTypes.CURSOR, new Param[]{
                        new Param(OracleTypes.INTEGER, pn100),
                        new Param(OracleTypes.CHAR, pvLogin)
                    });
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public List<N100> getListComN100D(int pnFH000, int pnFH200, int pnFK100, String pvLOGIN) {
        try {
            DataStatement dataStatement = new DataStatement(PackageContants.LIST_COMBN100D, OracleTypes.CURSOR, new Param[]{
                        new Param(OracleTypes.INTEGER, pnFH000),
                        new Param(OracleTypes.INTEGER, pnFH200),
                        new Param(OracleTypes.INTEGER, pnFK100),
                        new Param(OracleTypes.CHAR, pvLOGIN)
                    });
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public List<N100> getListComN100Project(int pnFH000, int pnFH200, String pvLOGIN) {
        try {
            DataStatement dataStatement = new DataStatement(PackageContants.LIST_COMBN100Project, OracleTypes.CURSOR, new Param[]{
                        new Param(OracleTypes.INTEGER, pnFH000),
                        new Param(OracleTypes.INTEGER, pnFH200),
                        new Param(OracleTypes.CHAR, pvLOGIN)
                    });
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public List<N100> getListComN100Name(int pnFH000, int pnFH200, int pnFN450, int pnFN850, String keysearch,int offset,int limit,int sort, int direction, String pvLOGIN) {
        try {
            DataStatement dataStatement = new DataStatement(PackageContants.LIST_N100NAME, OracleTypes.CURSOR, new Param[]{
                        new Param(OracleTypes.INTEGER, pnFH000),
                        new Param(OracleTypes.INTEGER, pnFH200),
                        new Param(OracleTypes.INTEGER, pnFN450),
                        new Param(OracleTypes.INTEGER, pnFN850),
                        new Param(OracleTypes.CHAR, keysearch),
                        new Param(OracleTypes.INTEGER, offset),
                        new Param(OracleTypes.INTEGER, limit),
                        new Param(OracleTypes.INTEGER, sort),
                        new Param(OracleTypes.INTEGER, direction),
                        new Param(OracleTypes.CHAR, pvLOGIN)
                    });
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public List<N100> getListComN100Email(int pnFH000, int pnFH200, int pnFN450, int pnFN850, String keysearch,int offset,int limit,int sort, int direction, String pvLOGIN) {
        try {
            DataStatement dataStatement = new DataStatement(PackageContants.LIST_N100EMAIL, OracleTypes.CURSOR, new Param[]{
                        new Param(OracleTypes.INTEGER, pnFH000),
                        new Param(OracleTypes.INTEGER, pnFH200),
                        new Param(OracleTypes.INTEGER, pnFN450),
                        new Param(OracleTypes.INTEGER, pnFN850),
                        new Param(OracleTypes.CHAR, keysearch),
                        new Param(OracleTypes.INTEGER, offset),
                        new Param(OracleTypes.INTEGER, limit),
                        new Param(OracleTypes.INTEGER, sort),
                        new Param(OracleTypes.INTEGER, direction),
                        new Param(OracleTypes.CHAR, pvLOGIN)
                    });
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public List<N100> getListComN100Mobile(int pnFH000, int pnFH200, int pnFN450, int pnFN850, String keysearch,int offset,int limit,int sort, int direction, String pvLOGIN) {
        try {
            DataStatement dataStatement = new DataStatement(PackageContants.LIST_N100MOBI, OracleTypes.CURSOR, new Param[]{
                        new Param(OracleTypes.INTEGER, pnFH000),
                        new Param(OracleTypes.INTEGER, pnFH200),
                        new Param(OracleTypes.INTEGER, pnFN450),
                        new Param(OracleTypes.INTEGER, pnFN850),
                        new Param(OracleTypes.CHAR, keysearch),
                        new Param(OracleTypes.INTEGER, offset),
                        new Param(OracleTypes.INTEGER, limit),
                        new Param(OracleTypes.INTEGER, sort),
                        new Param(OracleTypes.INTEGER, direction),
                        new Param(OracleTypes.CHAR, pvLOGIN)
                    });
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public List<N100> getListComN100Passport(int pnFH000, int pnFH200, int pnFN450, int pnFN850, String keysearch,int offset,int limit,int sort, int direction, String pvLOGIN) {
        try {
            DataStatement dataStatement = new DataStatement(PackageContants.LIST_N100PASS, OracleTypes.CURSOR, new Param[]{
                        new Param(OracleTypes.INTEGER, pnFH000),
                        new Param(OracleTypes.INTEGER, pnFH200),
                        new Param(OracleTypes.INTEGER, pnFN450),
                        new Param(OracleTypes.INTEGER, pnFN850),
                        new Param(OracleTypes.CHAR, keysearch),
                        new Param(OracleTypes.INTEGER, offset),
                        new Param(OracleTypes.INTEGER, limit),
                        new Param(OracleTypes.INTEGER, sort),
                        new Param(OracleTypes.INTEGER, direction),
                        new Param(OracleTypes.CHAR, pvLOGIN)
                    });
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public int updateColumnLogoN100(int pnPN100, byte[] pnVALUE, String pvLOGIN) {
        try {
            DataStatement updateN100 = new DataStatement(PackageContants.ORG_UPDATE_N100IMG, OracleTypes.INTEGER, new Param[]{
                        new Param(OracleTypes.INTEGER, pnPN100),
                        new Param(OracleTypes.BLOB, pnVALUE),
                        new Param(OracleTypes.CHAR, pvLOGIN)
                    });
            return super.update(updateN100, null);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return 0;
        }
    }

    @Override
    public int updateColumnOneTable(String pvSCHEMA, String pvTABNAME, String pvCOLNAME, String pnVALUE, String pvPRIMARYKEY, int pnCONDITION, String pvLOGIN) {
        try {
            DataStatement dateStatement = new DataStatement(PackageContants.ORG_UPDATE_N100, OracleTypes.INTEGER, new Param[]{
                        new Param(OracleTypes.CHAR, pvSCHEMA),
                        new Param(OracleTypes.CHAR, pvTABNAME),
                        new Param(OracleTypes.CHAR, pvCOLNAME),
                        new Param(OracleTypes.CHAR, pnVALUE),
                        new Param(OracleTypes.CHAR, pvPRIMARYKEY),
                        new Param(OracleTypes.INTEGER, pnCONDITION),
                        new Param(OracleTypes.CHAR, pvLOGIN)
                    });
            return super.updateNoOutParam(dateStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return 0;
        }
    }

    @Override
    public List<N100> getAllListTabN100R(int fh00, int fh200, int pnPN100, int pnFN450, int pnFN850, String pvLogin) {
        DataStatement dataStatement = new DataStatement(PackageContants.LIST_TABN100NR, OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.INTEGER, fh00),
                    new Param(OracleTypes.INTEGER, fh200),
                    new Param(OracleTypes.INTEGER, pnPN100),
                    new Param(OracleTypes.INTEGER, pnFN450),
                    new Param(OracleTypes.INTEGER, pnFN850),
                    new Param(OracleTypes.CHAR, pvLogin)
                });
        try {
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }

    }

    @Override
    public List<N100> getAllListTabN100All(int fh00, int fh200, int pnFN100,int pnFN450, int pnFN850,int pnFK400, String keysearch,int offset,int limit,int sort, int direction, String pvLogin) {
         DataStatement dataStatement = new DataStatement(PackageContants.LIST_N100All, OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.INTEGER, fh00),
                    new Param(OracleTypes.INTEGER, fh200),
                      new Param(OracleTypes.INTEGER, pnFN100),
                    new Param(OracleTypes.INTEGER, pnFN450),
                    new Param(OracleTypes.INTEGER, pnFN850),
                    new Param(OracleTypes.INTEGER, pnFK400),
                    new Param(OracleTypes.CHAR, keysearch),//nv103
                    new Param(OracleTypes.INTEGER, offset),
                    new Param(OracleTypes.INTEGER, limit),
                    new Param(OracleTypes.INTEGER, sort),
                    new Param(OracleTypes.INTEGER, direction),
                    new Param(OracleTypes.CHAR, pvLogin)
                });
        try {
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }

    }

    @Override
    public List<N100> getListComN100NMSNV(int pnFH000, int pnFH200, int pnFN450, int pnFN850, String keysearch,int offset,int limit,int sort, int direction,  String pvLOGIN) {
       try {
            DataStatement dataStatement = new DataStatement(PackageContants.LIST_N100MSNV, OracleTypes.CURSOR, new Param[]{
                        new Param(OracleTypes.INTEGER, pnFH000),
                        new Param(OracleTypes.INTEGER, pnFH200),
                        new Param(OracleTypes.INTEGER, pnFN450),
                        new Param(OracleTypes.INTEGER, pnFN850),
                        new Param(OracleTypes.CHAR, keysearch),
                        new Param(OracleTypes.INTEGER, offset),
                        new Param(OracleTypes.INTEGER, limit),
                        new Param(OracleTypes.INTEGER, sort),
                        new Param(OracleTypes.INTEGER, direction),
                        new Param(OracleTypes.CHAR, pvLOGIN)
                    });
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public List<N100> lstSearchAlpha(int pnFH000, int pnFH200, int pnFN450, int pnFN850, String pvSEARC, int pnOFFSET, int pnLIMIT, int pnSORT, int pnDIRECTION, String pvLOGIN) {
         try {
            DataStatement dataStatement = new DataStatement(PackageContants.LIST_N100ABC, OracleTypes.CURSOR, new Param[]{
                        new Param(OracleTypes.INTEGER, pnFH000),
                        new Param(OracleTypes.INTEGER, pnFH200),
                        new Param(OracleTypes.INTEGER, pnFN450),
                        new Param(OracleTypes.INTEGER, pnFN850),
                        new Param(OracleTypes.CHAR, pvSEARC),
                        new Param(OracleTypes.INTEGER, pnOFFSET),
                        new Param(OracleTypes.INTEGER, pnLIMIT),
                        new Param(OracleTypes.INTEGER, pnSORT),
                        new Param(OracleTypes.INTEGER, pnDIRECTION),
                        new Param(OracleTypes.CHAR, pvLOGIN)
                    });
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public int updateColumnLongText(String pvSCHEMA, String pvTABNAME, String pvCOLNAME, String pnVALUE, String pvPRIMARYKEY, int pnCONDITION, String pvLOGIN) {
       try {
            DataStatement dateStatement = new DataStatement(PackageContants.ORG_UPDATE_LONGTEXT, OracleTypes.INTEGER, new Param[]{
                        new Param(OracleTypes.CHAR, pvSCHEMA),
                        new Param(OracleTypes.CHAR, pvTABNAME),
                        new Param(OracleTypes.CHAR, pvCOLNAME),
                        new Param(OracleTypes.CHAR, pnVALUE),
                        new Param(OracleTypes.CHAR, pvPRIMARYKEY),
                        new Param(OracleTypes.INTEGER, pnCONDITION),
                        new Param(OracleTypes.CHAR, pvLOGIN)
                    });
            return super.updateNoOutParam(dateStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return 0;
        }
    }

    @Override
    public List<N100> listT950CNKH(int pnFH000, int pnFH200, String keySearch, String pvLOGIN) {
         try {
            DataStatement dataStatement = new DataStatement(PackageContants.LIST_T950CN_KH, OracleTypes.CURSOR, new Param[]{
                        new Param(OracleTypes.INTEGER, pnFH000),
                        new Param(OracleTypes.INTEGER, pnFH200),
                       
                        new Param(OracleTypes.CHAR, keySearch),
                        
                        new Param(OracleTypes.CHAR, pvLOGIN)
                    });
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public List<N100> comboboxForTour(int pnFH000, int pnFH200, int FV050, String pvLOGIN) {
        try {
            DataStatement dataStatement = new DataStatement(PackageContants.LIST_UPDATE_PESONALTOUR, OracleTypes.CURSOR, new Param[]{
                        new Param(OracleTypes.INTEGER, pnFH000),
                        new Param(OracleTypes.INTEGER, pnFH200),
                       
                        new Param(OracleTypes.INTEGER, FV050),
                        
                        new Param(OracleTypes.CHAR, pvLOGIN)
                    });
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public int checkMailExist(String pvNV105, String pnLogin) {
        DataStatement dataStatement = new DataStatement(PackageContants.CHECK_MAIL_EXIST, OracleTypes.INTEGER, new Param[]{
                    new Param(OracleTypes.CHAR, pvNV105),
                    new Param(OracleTypes.CHAR, pnLogin)
                });
        try {
            return super.update(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return 0;
        }   
    }

    @Override
    public int checkMobiExist(String pvNV109, String pnLogin) {
       DataStatement dataStatement = new DataStatement(PackageContants.CHECK_MOBI_EXIST, OracleTypes.INTEGER, new Param[]{
                    new Param(OracleTypes.CHAR, pvNV109),
                    new Param(OracleTypes.CHAR, pnLogin)
                });
        try {
            return super.update(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return 0;
        }   
    }

    @Override
    public List<N100> getListpersonalDD(int pnFH000, int pnFH200, String keysrearch, String pvLOGIN) {
          try {
            DataStatement dataStatement = new DataStatement(PackageContants.SEARCH_PERSONAL_DD, OracleTypes.CURSOR, new Param[]{
                        new Param(OracleTypes.INTEGER, pnFH000),
                        new Param(OracleTypes.INTEGER, pnFH200),          
                        new Param(OracleTypes.CHAR, keysrearch),                    
                        new Param(OracleTypes.CHAR, pvLOGIN)
                    });
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

  //  @Override
 //   public List<N100> getAllListTabN100AllBR(int pnFH000, int pnFH200,int pnFN600, String pvLOGIN) {
//        try {
//            DataStatement dataStatement = new DataStatement(PackageContants.LISTN100_BIR, OracleTypes.CURSOR, new Param[]{
//                        new Param(OracleTypes.INTEGER, pnFH000),
//                        new Param(OracleTypes.INTEGER, pnFH200),          
//                        new Param(OracleTypes.INTEGER, pnFN600),                    
//                        new Param(OracleTypes.CHAR, pvLOGIN)
//                    });
//            return super.find(dataStatement, N100.class);
//        } catch (SQLException ex) {
//            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
//            return null;
//        } catch (InstantiationException ex) {
//            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
//            return null;
//        } catch (IllegalAccessException ex) {
//            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
//            return null;
//        }
  //  }

    @Override
    public int convertEmtoCus(int pnPN100, String pvNV106, String pnLogin) {
        DataStatement dataStatement = new DataStatement(PackageContants.CONVERTEMTOCUS, OracleTypes.INTEGER, new Param[]{
            new Param(OracleTypes.INTEGER, pnPN100),
                    new Param(OracleTypes.CHAR, pvNV106),
                    new Param(OracleTypes.CHAR, pnLogin)
                });
        try {
            return super.update(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return 0;
        }   
    }

    @Override
    public List<N100> getListN100OutExcel(int fh00, int fh200, int fn450, int fn850, String pvLogin) {
       try {
            DataStatement dataStatement = new DataStatement(PackageContants.OUT_EXCEL_EMP, OracleTypes.CURSOR, new Param[]{
                        new Param(OracleTypes.INTEGER, fh00),
                        new Param(OracleTypes.INTEGER, fh200),          
                    new Param(OracleTypes.INTEGER, fn450),
                        new Param(OracleTypes.INTEGER, fn850),                    
                        new Param(OracleTypes.CHAR, pvLogin)
                    });
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public List<N100> getNCURPKS_LISTOFTABN100NDEL(int pnFH000, int pnFH200, int pnFN100, int pnFN450, int pnFN850, int FK400, String pvSEARC, int pnOFFSET, int pnLIMIT, int pnSORT, int pnDIRECTION, String pvLOGIN) {
      //  throw new UnsupportedOperationException("Not supported yet.");
          try {
            DataStatement dataStatement = new DataStatement(PackageContants.LIST_EMP_DELTETE, OracleTypes.CURSOR, new Param[]{
                        new Param(OracleTypes.INTEGER, pnFH000),
                        new Param(OracleTypes.INTEGER, pnFH200),
                         new Param(OracleTypes.INTEGER, pnFN100),
                        new Param(OracleTypes.INTEGER, pnFN450),
                        new Param(OracleTypes.INTEGER, pnFN850),
                         new Param(OracleTypes.INTEGER, FK400),
                        new Param(OracleTypes.CHAR, pvSEARC),
                        new Param(OracleTypes.INTEGER, pnOFFSET),
                        new Param(OracleTypes.INTEGER, pnLIMIT),
                        new Param(OracleTypes.INTEGER, pnSORT),
                        new Param(OracleTypes.INTEGER, pnDIRECTION),
                        new Param(OracleTypes.CHAR, pvLOGIN)
                    });
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    
    // danh sach hop dong
    @Override
    public List<N100> getNCURPKS_LISTOFTABN100NHD(int pnFH000, int pnFH200, int pnFN100, String pvLOGIN) {
       // throw new UnsupportedOperationException("Not supported yet.");
          try {
            DataStatement dataStatement = new DataStatement(PackageContants.LIST_EMP_HD, OracleTypes.CURSOR, new Param[]{
                        new Param(OracleTypes.INTEGER, pnFH000),
                        new Param(OracleTypes.INTEGER, pnFH200),
                         new Param(OracleTypes.INTEGER, pnFN100),
                    
                        new Param(OracleTypes.CHAR, pvLOGIN)
                    });
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public List<N100> getAllListTabN100AllBR(int pnFH000, int pnFH200, String pvLOGIN) {
      //  throw new UnsupportedOperationException("Not supported yet.");
         try {
            DataStatement dataStatement = new DataStatement(PackageContants.LISTN100_BIR, OracleTypes.CURSOR, new Param[]{
                        new Param(OracleTypes.INTEGER, pnFH000),
                        new Param(OracleTypes.INTEGER, pnFH200),          
                      //  new Param(OracleTypes.INTEGER, pnFN600),                    
                        new Param(OracleTypes.CHAR, pvLOGIN)
                    });
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }
      @Override
    public List<N100> getAllListTabN100AllBRC(int pnFH000, int pnFH200, String pvLOGIN) {
      //  throw new UnsupportedOperationException("Not supported yet.");
         try {
            DataStatement dataStatement = new DataStatement(PackageContants.LISTN100_BIRC, OracleTypes.CURSOR, new Param[]{
                        new Param(OracleTypes.INTEGER, pnFH000),
                        new Param(OracleTypes.INTEGER, pnFH200),          
                       // new Param(OracleTypes.INTEGER, pnFN600),                    
                        new Param(OracleTypes.CHAR, pvLOGIN)
                    });
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public List<N100> LISTOFTABN100STA(int pnFH000, int pnFH200, int pnPN100, int pnNN104, int pnFK330, Date pdMONFR, Date pdMONTO, int pnOFFSET, int pnLIMIT, int pnSORT, int pnDIRECTION, String pvLOGIN) {
        DataStatement dataStatement = new DataStatement(PackageContants.LIST_N100_STA, OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.INTEGER, pnFH000),
                    new Param(OracleTypes.INTEGER, pnFH200),
                    new Param(OracleTypes.INTEGER, pnPN100),
                    new Param(OracleTypes.INTEGER, pnNN104),
                    new Param(OracleTypes.INTEGER, pnFK330),
                    new Param(OracleTypes.DATE, pdMONFR),
                    new Param(OracleTypes.DATE, pdMONTO),
             
                    new Param(OracleTypes.INTEGER, pnOFFSET),
                    new Param(OracleTypes.INTEGER, pnLIMIT),
                    new Param(OracleTypes.INTEGER, pnSORT),
                    new Param(OracleTypes.INTEGER, pnDIRECTION),
                    new Param(OracleTypes.CHAR, pvLOGIN)
                });
        try {
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public List<N100> NCURPKS_LISTOFTABN100BDAY(int pnFH000, int pnFH200, int pnFN600, Date pdMONFR, Date pdMONTO, String pvLOGIN) {
        DataStatement dataStatement = new DataStatement(PackageContants.NCURPKS_LISTOFTABN100BDAY, OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.INTEGER, pnFH000),
                    new Param(OracleTypes.INTEGER, pnFH200),
                    new Param(OracleTypes.INTEGER, pnFN600),               
                    new Param(OracleTypes.DATE, pdMONFR),
                    new Param(OracleTypes.DATE, pdMONTO),
                    new Param(OracleTypes.CHAR, pvLOGIN)
                });
        try {
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public List<N100> ncurpks_listoftabn100lcon(int pnFH000, int pnFH200, int pnFH600, String pvLOGIN) {
         DataStatement dataStatement = new DataStatement(PackageContants.ncurpks_listoftabn100lcon, OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.INTEGER, pnFH000),
                    new Param(OracleTypes.INTEGER, pnFH200),
                    new Param(OracleTypes.INTEGER, pnFH600),               
                    new Param(OracleTypes.CHAR, pvLOGIN)
                });
        try {
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public int checkMobiCMND(String pvNV109, String pnLogin) {
         DataStatement dataStatement = new DataStatement(PackageContants.ADMIN_TOOLS_CHECKCMNPPDEXIST, OracleTypes.INTEGER, new Param[]{
                    new Param(OracleTypes.CHAR, pvNV109),
                    new Param(OracleTypes.CHAR, pnLogin)
                });
        try {
            return super.update(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return 0;
        }   
    }

   
}
